[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
BREAKIF conditional break:
~~~~~~~~~~~~~~~~~~~~~~~~~

Syntax:
~~~~~~~

  BREAKIF <Expr> [WITH <objError>]

Description:
~~~~~~~~~~~~
If the value of expresion <Expr> is true, the BREAK <objError> is performed.

Example:
~~~~~~~~
  ...
  BREAKIF i<0 WITH MakeErrorObject()
  ...

  STATIC FUNCTION MakeErrorObject()
    LOCAL o:=ErrorNew()
    o:Description:="Variable i has too small value!"
    o:Operation:="<"
    o:Severity:=ES_WHOCARES
    o:SubSystem:="Test i"
    o:Tries:=0
    o:CanRetry:=true
    RETURN o

If variable i < 0 there is a new clipper error object created and the
BREAK command is activated which is given the error object. Have a look
to the clipper Error class.

Source file is Object.ch

See Also: BEGIN BREAK
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson